<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>首页</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1658828_vud4w73neg.css">
    <link rel="stylesheet" href="../static/css/style.css">
</head>

<body class="bg-light">
    <nav class="navbar navbar-expand-sm navbar-dark bg-dark">
        <a class="navbar-brand" href="#">
            <img src="../static/img/logo.png" width="30" height="30" alt="">
            个人中心
        </a>
        <div class="navbar-nav">
            <a href="../index.html" class="nav-link">博客首页</a>
        </div>

        <ul class="navbar-nav ml-auto">
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" data-toggle="dropdown">
                    admin
                </a>
                <div class="dropdown-menu dropdown-menu-right">
                    <a class="dropdown-item" href="#">个人中心</a>
                    <a class="dropdown-item" href="/user/logout">退出</a>
                </div>
            </li>
        </ul>
    </nav>

    <div class="container-fluid vh-100">
        <div class="row h-100">
            <div class="col-2 bg-white border-right nav-left p-0">
                <div class="row text-center mt-3  px-5">
                    <a href="./add.html" class="btn btn-primary rounded-0 col">发表博文</a>
                </div>
                <div class="list-group list-group-flush border-top border-bottom mt-3 text-center">
                    <li class="list-group-item list-group-item-action">
                        <a href="../index.html" class="text-decoration-none text-secondary">
                            <i class="iconfont icon-home pr-1"></i>个人中心
                        </a>
                    </li>
                    <li class="list-group-item list-group-item-action active">
                        <a href="../article/index.html" class="text-decoration-none text-secondary">
                            <i class="iconfont icon-neirongguanli pr-1"></i>文章管理
                        </a>
                    </li>
                    <li class="list-group-item list-group-item-action">
                        <a href="../category/index.html" class="text-decoration-none text-secondary">
                            <i class="iconfont icon-leimuguanli pr-1"></i>类目管理
                        </a>
                    </li>
                    <li class="list-group-item list-group-item-action">
                        <a href="../log/index.html" class="text-decoration-none text-secondary">
                            <i class="iconfont icon-log pr-1"></i>查看日志
                        </a>
                    </li>
                    <li class="list-group-item list-group-item-action">
                        <a href="../account/index.html" class="text-decoration-none text-secondary">
                            <i class="iconfont icon-zhanghuguanli pr-1"></i>账户管理
                        </a>
                    </li>
                </div>
            </div>
            <div class="col-10">
                <div class="p-3 border mb-3 bg-white">
                    <h4 class="mb-0">文章管理</h4>
                </div>
                <div class="row mt-3">
                    <div class="col">
                        <div class="card">
                            <div class="card-header bg-primary text-white d-flex justify-content-between">
                                <h6 class="mb-0 align-self-center">发表文章</h6>
                            </div>
                            <div class="card-body">
                                <form action="/article/add" method="POST" enctype="multipart/form-data">
                                    <div class="form-row">
                                        <label for="title" class="col-2 text-center col-form-label">标题：</label>
                                        <input type="text" class="col-8 form-control" name="title" id="title" required>
                                        <span class="col-2 col-form-label text-danger">* 必填项</span>
                                    </div>
                                    <div class="form-row mt-3">
                                        <label for="category_id" class="col-2 text-center col-form-label">类目：</label>
                                        <select name="category_id" id="category_id" class="col-8 form-control">
                                            <option value="0">请选择</option>
                                            <option value="1">类目一</option>
                                            <option value="1">类目二</option>
                                            <option value="1">类目三</option>
                                        </select>
                                        <span class="col-2 col-form-label text-danger">* 必填项</span>
                                    </div>
                                    <div class="form-row mt-3">
                                        <label for="ue_content" class="col-2 text-center col-form-label">内容：</label>
                                        <div class="col-8 p-0">
                                            <textarea id="editor" name="content"></textarea>
                                        </div>
                                        <span class="col-2 col-form-label text-danger">* 必填项</span>
                                    </div>
                                    <div class="form-row mt-3">
                                        <label for="content" class="col-2 text-center col-form-label">热门：</label>
                                        <div class="col-8 col-form-label">
                                            <div class="custom-control custom-switch">
                                                <input type="checkbox" class="custom-control-input" id="hot" name='hot'
                                                    value='1'>
                                                <label class="custom-control-label" for="hot"></label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-row mt-3">
                                        <label for="content" class="col-2 text-center col-form-label">缩略图：</label>
                                        <div class="col-8">
                                            <input type="file" class="d-none" id="customFile" name="thumbnail"
                                                accept="image/*">
                                            <label for="customFile" class="position-relative">
                                                <img src="" data-src="holder.js/200x200?text=点击上传"
                                                    class="img-thumbnail" width="200" height="200">
                                                <button type="button" class="delimg btn btn-danger btn-sm position-absolute"
                                                    title="删除">&times;</button>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="form-row mt-3">
                                        <div class="offset-2">
                                            <input type="submit" value="提交" class="btn btn-success">
                                            <a href="./index.html" class="btn btn-danger ml-3">取消</a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="toasts position-absolute" style="min-width:300px;right:0;top:80px"></div>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/holder/2.9.6/holder.min.js"></script>
    <script src="https://gw.alipayobjects.com/os/lib/antv/g2/3.5.12/dist/g2.min.js"></script>
    <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.10.2/dist/data-set.min.js"></script>
    <script src="https://cdn.ckeditor.com/ckeditor5/17.0.0/classic/ckeditor.js"></script>
    <script src="../static/js/public.js"></script>
    <script>
        $('form').submit(function () {
            showToasts('成功', '操作成功')
        })
    </script>
</body>

</html>